App.Presenter.HomeCustomPagePresenter = (function (App) {

    var _router = App.Router;
    var _page = App.View.HomeCustomPage;
    var _cache = App.Data.Cache;
    var _Custom = App.Model.Custom;

    var onLoad = function (page_id) {
        _page.loadPage(page_id);
        _computeCustomGroupAndShow();
    };

    var _computeCustomGroupAndShow = function () {
        var all = _cache.customs.length;
        var groups = _cache.custom_groups;
        _page.setSpanNumber(all, groups[_Custom.TYPE_THISMONTH].length, groups[_Custom.TYPE_INTENTION].length, groups[_Custom.TYPE_DEAL].length);
    };

    return {
        onLoad:onLoad
    };

})(App);

// 注册展示器
App.Presenter.register(PAGE_HOME_CUSTOM, App.Presenter.HomeCustomPagePresenter);